package com.lagou.module4.service;

import com.lagou.module4.dao.StudentDao;
import com.lagou.module4.factory.StudentDaoFactory;
import com.lagou.module4.model.Student;

public class StudentService {
    private StudentDao studentDao;

    public StudentService(){
            this.studentDao= StudentDaoFactory.getStudentDao();
        }

    public int addStudentService(Student student){ return studentDao.addStudent(student); }
    public int removeStudentService(int id){
        return studentDao.removeStudent(id);
    }
    public int changeStudentService(Student student){
        return studentDao.changeStudent(student);
    }
    public Student searchStudentService(int id){
        return studentDao.searchStudent(id);
    }
}
